function DayDetailAction(dayModel, location, activity, secondActivity) {
    this._currentDay = dayModel;
    this._location = location;
    this._activity = activity;
    this._secondActivity = secondActivity;
}

DayDetailAction.prototype = {
    apply: function(repository, recordHistoryCallback) {
        
        recordHistoryCallback([this._currentDay.parentMonth()]);

        this._currentDay.setLocation(this._location);
        this._currentDay.setActivity(this._activity);
        this._currentDay.setSecondActivity(this._secondActivity);
        repository.markAsChanged([this._currentDay.parentMonth()]);
    },
    applyUI: function(calendarViewBody) {
        calendarViewBody.updateDays([this._currentDay]);
        calendarViewBody.updateLocations();
    }
};

